<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul id="list"></ul>
    <script>
        const start = Date.now()
        const listData = new Array(10000).fill(0).map((item,index)=>{
            return {
                id:index,
                name:`name${index}`
            }
        })
        for(let i=0;i<listData.length;i++){
            const item = listData[i]
            const li = document.createElement('li')
            li.innerHTML = item.name
            document.getElementById('list').appendChild(li)
        }
        console.log('js执行耗时'+(Date.now()-start))
        setTimeout(()=>{
            console.log('页面渲染完毕'+(Date.now()-start))
        },0)




    </script>
</body>
</html>
